<!--    鼠标滚动切换图片 -->
const sections = document.getElementsByClassName('section');

let currentSectionIndex = 0;

window.addEventListener('wheel',function(event){
    console.log(event);
    if(event.deltaY > 0){
        if(currentSectionIndex < sections.length-1){
            currentSectionIndex +=1;
            scrollToSection(currentSectionIndex);
        }
    }else{
        if(currentSectionIndex != 0){
            currentSectionIndex -=1;
            scrollToSection(currentSectionIndex);
        }
    }
})

function scrollToSection(index){
    sections[index].scrollIntoView({behavior:"smooth"})
}